package org.easy.web.config;

import org.easy.file.handler.FileQueue;
import org.easy.file.monitor.FileFactory;
import org.easy.socket.server.EasyServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @Author: wxl
 * @CreateTime: 2022/12/28 11:04
 */
@Configuration
public class AutoBeanConfiguration {

    @Bean(value = "fileFactory")
    public FileFactory fileFactory () {
        return FileFactory.create();
    }

    @Bean(value = "fileQueue")
    public FileQueue fileQueue () {
        return FileQueue.create();
    }

    @Bean
    public EasyServer easyServer () {
        EasyServer easyServer = new EasyServer();
        easyServer.setStartHeart(false);
        easyServer.start();
        return easyServer;
    }


}
